<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class THisdataSwdi extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_hisdata_SWDI', function (Blueprint $table) {
             $table->engine = 'MyISAM';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->bigIncrements('hd_index')->nullable(false)->comment('');
			$table->datetime('rd_updatetime')->nullable(false)->comment('');
			$table->datetime('hd_datetime')->nullable(false)->comment('');
			$table->unsignedBigInteger('pdi_index')->nullable(false)->default(0)->comment('');
			$table->boolean('hd_SWDI1')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI2')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI3')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI4')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI5')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI6')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI7')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI8')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI9')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI10')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI11')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI12')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI13')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI14')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI15')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDI16')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO1')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO2')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO3')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO4')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO5')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO6')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO7')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO8')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO9')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO10')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO11')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO12')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO13')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO14')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO15')->nullable()->default(0)->comment('');
			$table->boolean('hd_SWDO16')->nullable()->default(0)->comment('');
			$table->boolean('hd_NetCom')->nullable()->default(0)->comment('');
			$table->unique('hd_index', 'hd_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_hisdata_SWDI');
    }
}
